
#ifndef _USER_H
#define _USER_H

#include <initguid.h>
#include "Common.h"
//#include <winioctl.h>

#define UIH_CND_FPGA_NUMBER         3
#define UIH_CND_FPGA_ACQ_NUMBER 2

#define    DMAINBUFFERSIZE    0x00A00000     //10MB
#define    DMAOUTCONTIGUOUSMEMORYBLOCKNUM    0x00000002
#define    DMAOUTCONTIGUOUSMEMORYBLOCKSIZE   0x04000000  //64MB
#define    DMAOUTPOOLSIZE    0x20000000      //512MB



#define DEVICE_NAME "\\\\.\\UIHCnd"
#define	IOCTL_UIHCND_READ_REG	\
    CTL_CODE(FILE_DEVICE_UIHCND, 0x802,\
    METHOD_BUFFERED, FILE_ANY_ACCESS)

#define	IOCTL_UIHCND_WRITE_REG	\
    CTL_CODE(FILE_DEVICE_UIHCND, 0x803,\
    METHOD_IN_DIRECT, FILE_ANY_ACCESS)

#define IOCTL_UIHCND_START_ACQ \
    CTL_CODE(FILE_DEVICE_UIHCND, 0x804,\
    METHOD_IN_DIRECT, FILE_ANY_ACCESS)

#define IOCTL_UIHCND_COPY_DMA_BUFFER \
    CTL_CODE(FILE_DEVICE_UIHCND, 0x805,\
    METHOD_IN_DIRECT, FILE_ANY_ACCESS)

#define  IOCTL_UIHCND_READ_FPGAID \
    CTL_CODE(FILE_DEVICE_UIHCND, 0x806,\
    METHOD_BUFFERED, FILE_ANY_ACCESS)

#define  IOCTL_UIHCND_SET_FRAME_SIZE \
    CTL_CODE(FILE_DEVICE_UIHCND, 0x807,\
    METHOD_IN_DIRECT, FILE_ANY_ACCESS)

DEFINE_GUID(UIHCND_DEVINTERFACE_GUID, \
        0xd952c203, 0x56d4, 0x4289, 0x88, 0x92, 0xd4, 0x30, 0xf, 0x2a, 0x8, 0xd5);

typedef enum _UIH_CND_DMA_TYPE{
	UIH_CND_DMA_TYPE_IN,
	UIH_CND_DMA_TYPE_OUT,
	UIH_CND_DMA_TYPE_POOL
}UIH_CND_DMA_TYPE,*PUIH_CND_DMA_TYPE;


typedef struct tagUIHCND_REG
{
    ULONG ulReg;  //register want to access
    ULONG64 ulValue;     //Value to write if read just ignore it.
} UIHCND_REG, *PUIHCND_REG;

/*

typedef enum _UIH_CND_DMA_TYPE{
    UIH_GWB_DMA_TYPE_IN,
    UIH_GWB_DMA_TYPE_OUT,
    UIH_GWB_DMA_TYPE_POOL, 
}UIH_CND_DMA_TYPE,*PUIH_CND_DMA_TYPE;
*/

#endif

